<template>
  <div class="app-main-container">
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/application/applicationCenter' }" :replace="true">{{ $t('message.yyzx') }}</el-breadcrumb-item>
      <el-breadcrumb-item>{{ $t('message.jcsj') }}</el-breadcrumb-item>
    </el-breadcrumb>
    <el-tabs v-model="activeTab" class="mt20">
      <el-tab-pane :label="$t('message.jcsj')" name="1"><Index v-if="activeTab === '1'" :meta="meta" @changeTabs="changeTabs" /></el-tab-pane>
      <el-tab-pane :label="$t('message.hyktqk')" name="2"><MemberRecoord v-if="activeTab === '2'" :meta="meta" @changeTabs="changeTabs" /></el-tab-pane>
      <el-tab-pane :label="$t('message.ddgl')" name="0"><OrderRecord v-if="activeTab === '0'" :meta="meta" /></el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import Index from './tabs/index.vue'
import MemberRecoord from './tabs/memberRecoord.vue'
import OrderRecord from './tabs/orderRecord.vue'
export default {
  name: 'WonderfulMoments',
  components: {
    Index,
    MemberRecoord,
    OrderRecord
  },
  data() {
    return {
      activeTab: '1',
      meta: []
    }
  },
  created() {
    this.meta = this.$route.meta.buttons || []
    if (this.$route.query.activeTab) {
      this.activeTab = this.$route.query.activeTab
    }
  },
  activated() {
    if (this.$route.query.activeTab) {
      this.$refs.taskAdminRef.handleQuery()
    }
    if (this.$route.query.activeTab) {
      this.activeTab = this.$route.query.activeTab
    }
  },
  methods: {
    changeTabs(val) {
      this.activeTab = val
    }
  }

}
</script>

<style lang="scss" scoped>

</style>
